{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
$(document).ready(function() {
  $('#partyName').focus();
});
function myFunction()
{
	if(confirm("Are You Sure To Delete")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<form name="partyForm"action="{$smarty.server.PHP_SELF}" method="POST" onsubmit="return confirm('DO You Want To Submit !!!!!')";>
<table cellpadding="2" cellspacing="0" border="" align="center">
  <tr>
    <td colspan="2" style="background:#EBF5FF;">
      <h1 align="center"><font size="5px">Party Entry</font></h1>
    </td>
  </tr>
  <tr>
		<br>
    <th align="right">Party Name :</th>
    <td><input type="text" name="partyName" id="partyName" size="24" REQUIRED /></td>
  </tr>
  <tr>
    <th align="right" valign="top">Address :</th>
    <td><textarea cols="19" name="address" rows="6"></textarea></td>
  </tr>
  <tr>
    <th align="right">Mobile :</th>
    <td><input type="text" name="mobile" size="24"></td>
  </tr>
  <tr>
    <th align="right"  valign="top" >Other Information :</th>
    <td>
      <textarea cols="19" name="otherInfo" rows="6"></textarea>  	
    </td>
  </tr>
  <tr>
  	<td colspan="2" align="center"><input type="submit" value="Submit" name="submit"></td>
  </tr>
</table>
</form>
<table align="center" border="2"> 
	<h2 align="center">Party List</h2>
	<tr>
		<th class="table1">&nbsp;</th>
		<th class="table1">Party Name</th>
		<th class="table1">Address</th>
		<th class="table1">Mobile</th>
		<th class="table1">Other Information</th>
  </tr>
  {section name="sec" loop=$partyArray}
  <tr>
  	<td class="table1" align="center"><a href="partyDelete.php?partyId={$partyArray[sec].partyId}" onclick="return myFunction();" class="link"><img src="./images/deleteIco.png"></a></td>
  	<td class="table1" align="left">{$partyArray[sec].partyName}</td>
  	<td class="table1" align="left">{$partyArray[sec].address}</td>
  	<td class="table1" align="left">{$partyArray[sec].mobile}</td>
  	<td class="table1" align="left">{$partyArray[sec].otherInfo}</td>
  </tr>
  {/section}
</table>
{/block}